@use 'sass:color' as *;

$mock-prefix: ac-mock;
$rule-query-input-padding: 16px;
$rule-query-input-height: 28px;
$rule-list-max-height: 340px;

.#{$mock-prefix} {
  width: 740px;

  .el-dialog__header {
    padding: 14px 20px;
    .el-dialog__headerbtn {
      top: 17px;
      line-height: normal;
    }
  }

  &-container {
    padding: 18px 20px 12px 20px;

    .el-form .el-form-item {
      margin-bottom: 18px;
    }
  }

  &-layout {
    display: flex;
    justify-content: space-between;
  }

  &-layout__left {
    width: 35%;
    border: 1px solid #e4e4e4;
    padding: $rule-query-input-padding;
    max-height: $rule-list-max-height + $rule-query-input-height + $rule-query-input-padding * 2;
    @apply rounded;
  }

  &-layout__right {
    width: 60%;
    max-height: $rule-list-max-height + $rule-query-input-height + $rule-query-input-padding * 2;
    overflow: scroll;
  }

  &-rule__list {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: $rule-list-max-height;
    overflow: scroll;
  }

  &-rule__item {
    cursor: pointer;
    padding: 4px $rule-query-input-padding;

    &.current {
      @apply text-white;
      background-color: var(--primary-color);
    }

    &.current:hover {
      @apply text-white;
      background-color: var(--primary-color);
    }

    &.hover {
      background-color: adjust(#006bff, $alpha: -0.9);
    }
  }

  &-rule__syntax {
    margin-bottom: 20px;
  }

  &-rule__label {
    margin: 0 0 6px 0;
  }

  &-rule__desc {
    background-color: rgb(239, 239, 239);
    padding: 10px;
    line-height: 24px;
  }

  .el-button:active {
    border-color: var(--primary-color);
  }

  .el-button:focus,
  .el-button:hover {
    border-color: var(--primary-color);
  }

  .el-button--primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }

  .el-dialog__body {
    padding: 0;
  }
}
